<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>欢迎页面-X-admin2.0</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
		<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
		<link rel="stylesheet" href="./css/font.css">
		<link rel="stylesheet" href="./css/xadmin.css">
		<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
		<script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>
		<script type="text/javascript" src="./js/xadmin.js"></script>
		<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
		<!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
	</head>

	<body>
		<div class="x-body">
			<form class="layui-form" id="form1" action="doloss.do" method="post">

				<div class="layui-form-item layui-form-text">

					<div class="layui-input-block">
						<table class="layui-table">
							<tbody>
								<tr>
									<td>定损单号：</td>
									<td>
										<input type="text" name="lossid" id="a" value="${lossVO.loss.lossid}" class="layui-input" />
									</td>
									<td>车主身份证：</td>
									<td><input type="text" name="identity" id="" value="${lossVO.policy.identity  }" class="layui-input" /></td>
								</tr>
								<tr>
									<td>车牌号：</td>
									<td><input type="text" name="vin" id="" value="${lossVO.carinsuranceid.vin }" class="layui-input" /></td>
									<td>发动机号：</td>
									<td><input type="text" name="engine" id="" value="${lossVO.carinsuranceid.engine  }" class="layui-input" /></td>
									<td>车型号：</td>
									<td><input type="text" name="cartype" id="" value="${lossVO.carinsuranceid.cartype  }" class="layui-input" /></td>
								</tr>
								
								<tr>
									<td colspan="6" style="height: 20px;background-color: rgb(200,238,238);"></td>
								</tr>
								<tr>
									<td colspan="6">
										<table id="parts">
											<tr>
												<td>定损部位</td>
												
												<td>定价</td>
												
												<td>操作</td>
												<td rowspan="100"><input type="button" value="添 加" id="add" class="layui-btn"/></td>
											</tr>
										
											
											
										
										</table>
									</td>
								</tr>
								<tr>
									<td colspan="6" style="height: 20px;background-color: rgb(200,238,238);"></td>
								</tr>
							
								<tr>
									<td>总报损价：</td>
									<td><input type="text" name="lossTotal" id="" value="${vo.lossTotal }" class="layui-input" /></td>
									
									<td>报损时间：</td>
									<td><input type="date" name="lossTime" id="" value="${time}" class="layui-input" /></td>
								</tr>
							
							</tbody>
						</table>
					</div>
				</div>

				<div class="layui-form-item">
					<label for="L_repass" class="layui-form-label">
              </label>
              		<input type="hidden" name="operation" value="${operation }" />
              		<input type="hidden" name="num2" value="${num2 }" />
					<input type="submit" class="layui-btn"  value="保 存" />
				</div>
			</form>
		</div>
		<script type="text/javascript" src="js/jquery-1.12.4.js"></script>
		<script>
			$(document).ready(function() {
			
//			
				var i = 1;
				//真是痛苦啊
				$("#add").click(function(){
						var $tr = $("<tr><td><input type='text' name='discribe' id='' class='layui-input' /></td><td>"
						
						+"<input type='text' name='money' id='' class='layui-input' /></td><td>"
						+"<input type='button' value='删 除' id='del"+i+"' onclick='del(this)' class='layui-btn' style='background-color: rgb(255 87 34);'/></td></tr>");
						
						$("#parts tr:last-child").after($tr);
						i++;
				});
				
				
			})
		</script>
		<script>
			//终于找到你了
			function del (e) {
				document.getElementById(e.id).parentElement.parentElement.remove();
			}
		</script>
		
	
		
		<script>
			var _hmt = _hmt || [];
			(function() {
				var hm = document.createElement("script");
				hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
				var s = document.getElementsByTagName("script")[0];
				s.parentNode.insertBefore(hm, s);
			})();
		</script>
	</body>

</html>